package com.zzsong.lambda.pratice;


public class VideoOrder {

    private String tradeNo;

    private int money;

    private String title;

    public VideoOrder(String tradeNo, String title, int money) {
        this.tradeNo = tradeNo;
        this.title = title;
        this.money = money;
    }

    public String getTradeNo() {
        return tradeNo;
    }

    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Override
    public boolean equals(Object obj) {
        if(obj instanceof  VideoOrder){
            VideoOrder o1 =  (VideoOrder)obj;
            return title.equals(o1.title);
        }
        return super.equals(obj);
    }


    @Override
    public int hashCode() {
        return title.hashCode();
    }


    @Override
    public String toString() {
        return "VideoOrder{" +
                "title='" + title + '\'' +
                '}';
    }
}
